<template>
  <view class="content">
    <image :src="detail.headPic" mode="scaleToFill" />
    <view>
      <text>昵称：</text>
      <text>{{ detail.nickName }}</text>
    </view>
    <view>
      <text>账号：</text>
      <text>{{ detail.username }}</text>
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref } from "vue";
const detail = ref({
  createTime: "",
  email: "",
  headPic: "",
  id: 0,
  nickName: "",
  username: "",
});

const getInfo = async () => {
  uni.getStorage({
    key: "USER_INFO",
    success(res) {
      console.log(res)
      Object.assign(detail.value, res.data);
    },
  });
};

getInfo();
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
